
INCLUDE_DIRECTORIES(  ${LUAEx_SOURCE_DIR} )
INCLUDE_DIRECTORIES(  ${LUA_INCLUDE_DIR} )
INCLUDE_DIRECTORIES(  ${SOL2_INCLUDE_DIR} )
INCLUDE_DIRECTORIES(  ${EIGEN3_INCLUDE_DIR} )
INCLUDE_DIRECTORIES(  ${EIGEN3_INCLUDE_DIR}/superlu_mt/ )
INCLUDE_DIRECTORIES(  ${Boost_INCLUDE_DIR} )
INCLUDE_DIRECTORIES(  ${MYLIB_DIR} )
INCLUDE_DIRECTORIES(  ${MYLIB_LOG_INCLUDE_DIR} )
INCLUDE_DIRECTORIES(  ${PARSERS_INCLUDE_DIR} )


set(LUA_NUMERIC_ALLFILES  
						eigen.c
						matrix.cpp
						tensor.cpp
						tensor-impl.cpp
						eigen_sparse.cpp
						vector.cpp
						map.cpp
						complex.cpp
						numeric.cpp
						global.cpp
						fourier_transform.cpp
						point.cpp
						)

if(LUA_NUMERIC_STATIC_LIB)
	ADD_LIBRARY(luaNumeric STATIC ${LUA_NUMERIC_ALLFILES})
else()
	ADD_LIBRARY(luaNumeric SHARED ${LUA_NUMERIC_ALLFILES})
    if(WIN32)
        add_definitions( -DLUA_NUMERIC_DLL -DluaNumeric_EXPORTS )
    endif(WIN32)
endif()
#add_definitions(-DEIGEN_USE_MKL_ALL)

add_definitions(-DUNICODE -D_UNICODE)

if(WIN32 OR APPLE)
    target_link_libraries(luaNumeric ${LUA_LIBRARY}
    								 ${EXTERNAL_LIBRARIES}
    								 ${PARSERS_LIBRARY}
     								 ${MYLIB_LOG_LIBRARY})
    
endif()
target_link_libraries(luaNumeric ${ARPACK_LIB})
#target_link_libraries(luaNumeric ARPACK::ARPACK)

SET_TARGET_PROPERTIES(luaNumeric PROPERTIES PREFIX "")
collect_library(luaNumeric)
